.align 2
.section .data
.section .text
.global __aeabi_memclr4
__aeabi_memclr4:
.L1:
		MV	t5, a0
		MV	t6, a1
		ADD	t6, a0, t6
		LI	a0, 0
.L2:
		SW	zero, (t5)
		ADDI	t5, t5, 4
		BLT	t5, t6, .L2
		RET
.global my_getint
my_getint:
.L3:
		ADDI	sp, sp, -264
		SD	fp, 40(sp)
		ADDI	fp, sp, 264
		SD	ra, -232(fp)
		SD	s2, -240(fp)
		SD	s3, -248(fp)
		SD	s4, -256(fp)
		SD	s5, -264(fp)
.L4:
		LI	t0, 0
		SW	t0, -208(fp)
		J	.L5
.L6:
		LW	s2, -216(fp)
		SW	s2, -16(fp)
		LW	a0, -16(fp)
		LD	s5, -264(fp)
		LD	s4, -256(fp)
		LD	s3, -248(fp)
		LD	s2, -240(fp)
		LD	ra, -232(fp)
		LD	fp, -224(fp)
		ADDI	sp, sp, 264
		RET
.L5:
		LI	s2, 1
		LI	s3, 0
		SUB	t6, s2, s3
		SNEZ	s4, t6
		SW	a0, -16(fp)
		SW	s4, -32(fp)
		LW	s2, -32(fp)
		BGTZ	s2, .L7
		J	.L8
.L7:
		ADDI	sp, sp, -8
		CALL	getch
		ADDI	sp, sp, 8
		SW	a0, -40(fp)
		LW	s3, -40(fp)
		LI	s4, 48
		SUB	s5, s3, s4
		SW	s5, -200(fp)
		SW	s2, -32(fp)
		LW	s2, -200(fp)
		SW	s3, -40(fp)
		LI	s3, 0
		SLT	s4, s2, s3
		SW	s2, -64(fp)
		SW	s4, -72(fp)
		SW	s5, -48(fp)
		LW	s2, -72(fp)
		BGTZ	s2, .L9
		J	.L10
.L8:
		LW	s3, -200(fp)
		SW	s3, -208(fp)
		SW	s2, -72(fp)
		SW	s3, -80(fp)
		J	.L11
.L9:
		J	.L5
.L12:
		J	.L8
.L13:
		J	.L5
.L10:
		LW	s2, -200(fp)
		LI	s3, 9
		SLT	s4, s3, s2
		SW	s2, -88(fp)
		SW	s4, -96(fp)
		LW	s2, -96(fp)
		BGTZ	s2, .L9
		J	.L12
.L11:
		LI	s3, 1
		LI	s4, 0
		SUB	t6, s3, s4
		SNEZ	s5, t6
		SW	s2, -96(fp)
		SW	s5, -104(fp)
		LW	s2, -104(fp)
		BGTZ	s2, .L14
		J	.L15
.L14:
		ADDI	sp, sp, -8
		CALL	getch
		ADDI	sp, sp, 8
		SW	a0, -112(fp)
		LW	s3, -112(fp)
		LI	s4, 48
		SUB	s5, s3, s4
		SW	s5, -200(fp)
		SW	s2, -104(fp)
		LW	s2, -200(fp)
		SW	s3, -112(fp)
		LI	s3, 0
		SLT	s4, s2, s3
		XORI	s4, s4, 1
		SW	s2, -128(fp)
		SW	s4, -136(fp)
		SW	s5, -120(fp)
		LW	s2, -136(fp)
		BGTZ	s2, .L16
		J	.L17
.L15:
		LW	s3, -208(fp)
		SW	s3, -216(fp)
		SW	s2, -136(fp)
		SW	s3, -144(fp)
		J	.L6
.L18:
		LW	s2, -208(fp)
		LI	s3, 10
		MULW	s4, s2, s3
		LW	s5, -200(fp)
		SW	s2, -152(fp)
		ADDW	s2, s4, s5
		SW	s2, -208(fp)
		SW	s2, -176(fp)
		SW	s4, -160(fp)
		SW	s5, -168(fp)
		J	.L19
.L17:
		J	.L15
.L19:
		J	.L11
.L16:
		LW	s2, -200(fp)
		LI	s3, 9
		SLT	s4, s3, s2
		XORI	s4, s4, 1
		SW	s2, -184(fp)
		SW	s4, -192(fp)
		LW	s2, -192(fp)
		BGTZ	s2, .L18
		J	.L17
.global my_putint
my_putint:
.L20:
		ADDI	sp, sp, -288
		SD	fp, 32(sp)
		ADDI	fp, sp, 288
		SD	ra, -264(fp)
		SD	s2, -272(fp)
		SD	s3, -280(fp)
		SD	s4, -288(fp)
.L21:
		SW	a0, -248(fp)
		LI	t0, 0
		SW	t0, -176(fp)
		SW	a0, (fp)
		J	.L22
.L23:
		LD	s4, -288(fp)
		LD	s3, -280(fp)
		LD	s2, -272(fp)
		LD	ra, -264(fp)
		LD	fp, -256(fp)
		ADDI	sp, sp, 288
		RET
.L22:
		LW	s2, -248(fp)
		LI	s3, 0
		SLT	s4, s3, s2
		SW	s2, -24(fp)
		SW	s4, -32(fp)
		LW	s2, -32(fp)
		BGTZ	s2, .L24
		J	.L25
.L24:
		LW	s3, -176(fp)
		ADDI	s4, fp, -240
		MV	t2, s4
		LI	t3, 4
		MUL	t3, s3, t3
		ADD	t2, t3, t2
		ADD	t2, t2, zero
		SD	t2, -48(fp)
		SW	s2, -32(fp)
		LW	s2, -248(fp)
		LI	s4, 10
		SW	s3, -40(fp)
		REMW	s3, s2, s4
		SW	s2, -64(fp)
		LI	s2, 48
		ADDW	s4, s3, s2
		LD	t4, -48(fp)
		SW	s4, (t4)
		SW	s3, -72(fp)
		LW	s3, -248(fp)
		LI	s2, 10
		SW	s4, -80(fp)
		DIVW	s4, s3, s2
		SW	s4, -248(fp)
		SW	s3, -88(fp)
		LW	s3, -176(fp)
		LI	s2, 1
		SW	s4, -96(fp)
		ADDW	s4, s3, s2
		SW	s4, -176(fp)
		SW	s3, -104(fp)
		SW	s4, -112(fp)
		J	.L22
.L25:
		J	.L26
.L26:
		LW	s2, -176(fp)
		LI	s3, 0
		SLT	s4, s3, s2
		SW	s2, -120(fp)
		SW	s4, -128(fp)
		LW	s2, -128(fp)
		BGTZ	s2, .L27
		J	.L28
.L27:
		LW	s3, -176(fp)
		LI	s4, 1
		SW	s2, -128(fp)
		SUB	s2, s3, s4
		SW	s2, -176(fp)
		SW	s3, -136(fp)
		LW	s3, -176(fp)
		ADDI	s4, fp, -240
		MV	t2, s4
		LI	t3, 4
		MUL	t3, s3, t3
		ADD	t2, t3, t2
		ADD	t2, t2, zero
		SD	t2, -160(fp)
		SW	s2, -144(fp)
		LD	t4, -160(fp)
		LW	s2, (t4)
		ADDI	sp, sp, -24
		SW	s2, -168(fp)
		LW	a0, -168(fp)
		CALL	putch
		ADDI	sp, sp, 24
		SW	a0, -168(fp)
		SW	s3, -152(fp)
		J	.L26
.L28:
		J	.L23
.global main
main:
.L29:
		ADDI	sp, sp, -152
		SD	fp, 32(sp)
		ADDI	fp, sp, 152
		SD	ra, -128(fp)
		SD	s2, -136(fp)
		SD	s3, -144(fp)
		SD	s4, -152(fp)
.L30:
		ADDI	sp, sp, -16
		CALL	my_getint
		ADDI	sp, sp, 16
		SW	a0, -8(fp)
		LW	s2, -8(fp)
		SW	s2, -104(fp)
		SW	s2, -8(fp)
		J	.L31
.L32:
		LW	s2, -112(fp)
		SW	s2, -24(fp)
		LW	a0, -24(fp)
		LD	s4, -152(fp)
		LD	s3, -144(fp)
		LD	s2, -136(fp)
		LD	ra, -128(fp)
		LD	fp, -120(fp)
		ADDI	sp, sp, 152
		RET
.L31:
		LW	s2, -104(fp)
		LI	s3, 0
		SLT	s4, s3, s2
		SW	a0, -24(fp)
		SW	s2, -40(fp)
		SW	s4, -48(fp)
		LW	s2, -48(fp)
		BGTZ	s2, .L33
		J	.L34
.L33:
		ADDI	sp, sp, -16
		CALL	my_getint
		ADDI	sp, sp, 16
		SW	a0, -56(fp)
		LW	s3, -56(fp)
		SW	s3, -96(fp)
		LW	s4, -96(fp)
		ADDI	sp, sp, -16
		SW	s4, -72(fp)
		LW	a0, -72(fp)
		CALL	my_putint
		ADDI	sp, sp, 16
		ADDI	sp, sp, -16
		SW	a0, -72(fp)
		LI	a0, 10
		CALL	putch
		ADDI	sp, sp, 16
		SW	s2, -48(fp)
		LW	s2, -104(fp)
		SW	s3, -56(fp)
		LI	s3, 1
		SUB	s4, s2, s3
		SW	s4, -104(fp)
		SW	s2, -80(fp)
		SW	s4, -88(fp)
		J	.L31
.L34:
		LI	t0, 0
		SW	t0, -112(fp)
		J	.L32

